package com.xj.onetosix;

public class Student {

    String name;

    public String playGame(String gameName, int grad) {
        test();
        System.out.println(name + "在玩" + gameName);
        if (grad > 4) {
            return "艰难过关";
        } else {
            return "小卡拉米，级别太低";
        }

    }

    public void test() {
        System.out.println("测试");
    }

    public static void main(String[] args) {
        Student student1 = new Student();    //new 代表在内存中申请了一块空间
        student1.name = "小佳";
        Student student2 = new Student();
        student2.name = "帅";

        System.out.println(student1.playGame("和平精英", 6));
        System.out.println(student2.playGame("拳皇97", 3));

        /*String str1 = new String("aaa");
        String str2 = new String("aaa");

        System.out.println(str1.equals(str2));   //equals比较的是内存地址中的值*/
    }
}
